package com.zjb.home.boxingtu.activity.indicator;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;

import com.zjb.home.boxingtu.BlankFragment;
import com.zjb.home.boxingtu.R;
import com.zjb.home.boxingtu.view.other.LineIndicatorShakeView;
import com.zjb.home.boxingtu.view.other.LineIndicatorView;

import butterknife.BindView;
import butterknife.ButterKnife;

public class Indicator01Activity extends AppCompatActivity {

    @BindView(R.id.indicatorView)
    LineIndicatorView indicatorView;
    @BindView(R.id.viewPager)
    ViewPager viewPager;
    @BindView(R.id.indicatorShakeView)
    LineIndicatorShakeView indicatorShakeView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_indicator01);
        ButterKnife.bind(this);
        viewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
            @Override
            public Fragment getItem(int position) {
                return new BlankFragment(position);
            }

            @Override
            public int getCount() {
                return 3;
            }
        });
        indicatorView.bindViewPager(viewPager);
        indicatorShakeView.bindViewPager(viewPager);
    }
}
